package cn.doitedu.day07

import org.apache.spark.sql.{DataFrame, SparkSession}

object T12_CreateDataFrameFromParquet {

  def main(args: Array[String]): Unit = {

    val spark = SparkSession.builder().appName(this.getClass.getSimpleName)
      .master("local[4]")
      .getOrCreate()

    //sparksql支持统一的数据访问方式
    val df: DataFrame = spark.read.parquet("data/order.snappy.parquet")

    df.printSchema()
    df.show(50)


    Thread.sleep(1000000)

  }

}
